package com.eshop.we.service;

import com.alibaba.dubbo.config.annotation.Service;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.IService;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.eshop.we.mapper.SchoolMapper;
import com.eshop.we.school.api.SchoolService;
import com.eshop.we.school.dto.SchoolDto;
import com.eshop.we.school.entity.School;
import com.eshop.we.user.api.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * <p>
 * 学校 服务实现类
 * </p>
 *
 * @author anonymity
 * @since 2018-07-04
 */
@Service(interfaceClass = SchoolService.class)
@Component
public class SchoolServiceImpl extends ServiceImpl<SchoolMapper, School> implements SchoolService {

    @Override
    public Page selectSchoolPage(Page<SchoolDto> page, String schoolName) {

        List<SchoolDto> list= baseMapper.selectSchoolPage(page,schoolName);
        page.setRecords(list);
        return page;
    }
}
